<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<%@taglib prefix="spring" uri="http://www.springframework.org/tags" %>
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
    <link rel="stylesheet" href='<spring:url value="/resources/css/jquery-ui-1.10.4.custom.css"></spring:url>'/>
    <link rel="stylesheet" href='<spring:url value="/resources/css/validationEngine.jquery.css"></spring:url>'/>
    <link rel="stylesheet" href='<spring:url value="/resources/css/template.css"></spring:url>'/>
    <link rel="stylesheet" href='<spring:url value="/resources/css/top.css"></spring:url>' type="text/css"/>
    <link rel="stylesheet" href='<spring:url value="/resources/css/middle.css"></spring:url>'>
    <link rel="stylesheet" href='<spring:url value="/resources/css/bottom.css"></spring:url>' type="text/css"/>
    <script src='<spring:url value="/resources/js/jquery-1.11.0.js"></spring:url>'></script>
    <script src='<spring:url value="/resources/js/jquery-ui-1.10.4.custom.js" ></spring:url>'></script>
    <script src='<spring:url value="/resources/js/jquery.validationEngine-zh_CN.js" ></spring:url>'></script>
    <script src='<spring:url value="/resources/js/jquery.validationEngine.js" ></spring:url>'></script>
    <script src='<spring:url value="/resources/js/common.js" ></spring:url>'></script>
    <script type="text/javascript">
        $(function () {
            var height = $(window).height();
            $("#div").css("height", height + "px");
            $("#div_1").css("height", (height - 40) + "px");
            $("#frmNecessaryInfo").validationEngine();
            $("input[name='moderator']").click(function () {
                var val = $("input[name='moderatorId']").val();
                var data = getStafferTree("/foc/user/conferencebook/getStaffer");
                $("#treeModerator").initTree({
                    id: "treeModerator",
                    title: "选择主持人",
                    width: 350,
                    height: 450,
                    multiSelected: false,
                    data: data,
                    defaultValue: val,
                    modal: true,
                });
                $("#treeModerator").openTree();
                $("#treeModerator").bind("selectedTree", function (event, name, value) {
                    $("input[name='moderatorId']").val(value);
                    $("input[name='moderator']").val(name);
                });
            });
            $("textarea[name='staffer']").click(function () {
                var val = $("input[name='stafferId']").val();
                var data = getStafferTree("/foc/user/conferencebook/getStaffer");
                $("#treeStaffer").initTree({
                    id: "treeStaffer",
                    title: "选择参会人员",
                    width: 350,
                    height: 450,
                    multiSelected: true,
                    data: data,
                    defaultValue: val,
                    modal: true,
                });
                $("#treeStaffer").openTree();
                $("#treeStaffer").bind("selectedTree", function (event, name, value) {
                    $("input[name='stafferId']").val(value);
                    $("textarea[name='staffer']").val(name);
                });
            });
        });
    </script>
</head>
<body>
<DIV id="div" style="background-color:#ededed;" align="center">
    <div id="div_1">
        <div class="logo_css">
            <div class="img_css"><img src='<spring:url value="/resources/images/admin/logo.png"></spring:url>'
                                      border="0"/></div>
            <div class="time_css">
                <div class="time_css_td1">
                    <table align="right">
                        <tr>
                            <td class="time_css_td2">${userVO.userRole.roleName}: ${userVO.userName}</td>
                            <!-- <td></td> 		<td></td> 		<td></td> -->
                            <td>
                                <form:form id="frm" action="" method="post">
                                    <a class="font_quit" href="#"
                                       onclick="submitFrm('#frm','/foc/user/conferencebook/logout')">退出系统</a>
                                </form:form>
                            </td>
                        </tr>
                    </table>
                </div>
            </div>
        </div>
        <div>
            <table align="center">
                <tr>
                    <td><img src='<spring:url value="/resources/images/user/yuding_1.png" ></spring:url>' border="0"/>&nbsp;
                    </td>
                    <td><img src='<spring:url value="/resources/images/user/yuding_2_1.png" ></spring:url>' border="0"/>&nbsp;
                    </td>
                    <td><img src='<spring:url value="/resources/images/user/yuding_3_1.png" ></spring:url>' border="0"/>&nbsp;
                    </td>
                    <td><img src='<spring:url value="/resources/images/user/yuding_4_1.png" ></spring:url>' border="0"/>
                    </td>
                </tr>
            </table>
        </div>

        <div class="step_div" align="center">
            <form id="frmNecessaryInfo" method="post">
                <table id="queryTable2" align="center">
                    <tr>
                        <td align="left">会议名称:</td>
                    </tr>
                    <tr>
                        <td align="left">
                            <input name="id" type="hidden"
                                   value='<c:if test="${conference.id != null}">${conference.id}</c:if>'/>
                            <input name="meetingName" type="text"
                                   value='<c:if test="${conference.meetingName != null}">${conference.meetingName}</c:if>'
                                   class="validate[required,maxSize[15]] text-input"/>
                            <a style="color:#ff0000;">&nbsp;*</a></td>
                    </tr>
                    <tr>
                        <td align="left">所属项目:</td>
                    </tr>
                    <tr>
                        <td align="left">
                            <select name="projectId">
                                <option value="0">--</option>
                                <c:forEach var="project" items="${ project }">
                                    <option
                                            <c:if test="${conference.project.id ==project.id}">selected="selected"</c:if>
                                            value="${project.id}">${project.projectName}</option>
                                </c:forEach>
                            </select>
                        </td>
                    </tr>
                    <tr>
                        <td align="left">会议密级:</td>
                    </tr>
                    <tr>
                        <td align="left">
                            <select name="secretLevel">
                                <option
                                        <c:if test="${conference.secretLevel == 0}">selected="selected"</c:if>
                                        value="0">未涉密
                                </option>
                                <option
                                        <c:if test="${conference.secretLevel == 1}">selected="selected"</c:if>
                                        value="1">涉密
                                </option>
                            </select>
                        </td>
                    </tr>
                    <tr>
                        <td align="left" valign="top">主持人:</td>
                    </tr>
                    <tr>
                        <td align="left" valign="top">
                            <input type="hidden" name="moderatorId"
                                   value='<c:if test="${conference.moderator != null}">${conference.moderator.id}</c:if>'/>
                            <input type="text" name="moderator"
                                   value='<c:if test="${conference.moderator != null}">${conference.moderator.stafferName}</c:if>'
                                   class="validate[optional,maxSize[15]] text-input"/>
                        </td>
                    </tr>
                    <tr>
                        <td align="left" valign="top">参会人员:</td>
                    </tr>
                    <tr>
                        <td align="left" valign="top">
                            <input type="hidden" name="stafferId"
                                   value='<c:if test="${conference.staffer != null}">${conference.stafferId}</c:if>'/>
                            <textarea name="staffer" class="validate[required,maxSize[1000]] text-input"><c:if
                                    test="${conference.staffer != null}">${conference.stafferName}</c:if></textarea>
                            <a style="color:#ff0000;">&nbsp;*</a></td>
                    </tr>
                </table>

            </form>
        </div>
        <hr/>
        <div align="center" style="margin-top:20px; margin-bottom: 10px">
            <form id="returnMyconference" method="post"></form>
            <a href="#" name="btnBack" onclick="submitFrm('#returnMyconference','/foc/user/myconference/load')"><img
                    src='<spring:url value="/resources/images/user/last.png" ></spring:url>' border="0"/></a>
            <a href="#" name="btnNext"
               onclick="submitFrm('#frmNecessaryInfo','/foc/user/conferencebook/saveNecessaryInfo')"><img
                    src='<spring:url value="/resources/images/user/next.png" ></spring:url>' border="0"/></a>
        </div>
    </div>
    <div id="bottom">
        <table cellpadding="0" cellspacing="0" align="center" bgcolor="#094782" width="100%">
            <tr>
                <td align="center"><img src='<spring:url value="/resources/images/bottom/bottom_logo.png"></spring:url>'
                                        border="0"/></td>
            </tr>
        </table>
    </div>
</DIV>
<div id="treeModerator"></div>
<div id="treeStaffer"></div>
</body>
</html>